<?php
defined('BASEPATH') OR exit('No direct script access allowed');


use QCloud_WeApp_SDK\Mysql\Mysql as DB;



class ProductList extends CI_Controller {
    public function index() {
        $rows = DB::select('cc_goods');
        if (!empty($rows)){
            $this->json([
                'code' => 0,
                'data' => $rows
            ]);
        } else {
            $this->json([
                'code' => -1,
                'error' => $rows['error']
            ]);
        }
    }
}
